# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sipp
pkgver=1566.4150a2a
pkgrel=1
groups=('blackarch' 'blackarch-voip')
pkgdesc='A free Open Source test tool / traffic generator for the SIP protocol.'
arch=('x86_64' 'aarch64')
url='http://sipp.sourceforge.net/'
license=('GPL')
depends=('openssl' 'libpcap')
makedepends=('git' 'subversion' 'cmake')
source=("git+https://github.com/SIPp/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  ./build.sh --none
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" CHANGES.md README.md
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

